<?php
require_once 'phpmoko/lib/common.php';

require_once 'phpmoko/ui/Widget.php';

class HTML extends Widget
{
	private $html;
	private $title = null;

	function __construct($html)
	{
		parent::__construct();
		$this->html = $html;
	}

	function setTitle($title)
	{
		$this->title = $title;
	}

	function toString()
	{
		$str = '<div';

		$str .= ' id="' . $this->id . '"';

		$str .= ' style="width: 100%;';

		if (!$this->isVisible())
			$str .= ' display: none;';

		$str .= '"';

		if ($this->title)
			$str .= ' title="' . $this->title . '"';

		$str .= ' class="pmk-HTML"';

		$str .= '>';

		$str .= $this->html;

		$str .= '</div>';

		return $str;
	}
}
?>